import {PageContainer} from "@ant-design/pro-components";
import {history} from "umi";
import {Button, Card, Table, Row, Col} from "antd";
import ReactECharts from 'echarts-for-react';

export default (props) => {
  const urlArr = history.location.pathname.split('/')
  const school = urlArr[urlArr.length - 1]
  const subject = urlArr[urlArr.length - 2]
  const content = urlArr[urlArr.length - 3]
  // echarts Demo 数据
  const options = {
    title: {
      text: 'ECharts 入门示例'
    },
    tooltip: {},
    legend: {
      data: ['销量']
    },
    xAxis: {
      data: ['衬衫', '羊毛衫', '雪纺衫', '裤子', '高跟鞋', '袜子']
    },
    yAxis: {},
    series: [
      {
        name: '销量',
        type: 'bar',
        data: [5, 20, 36, 10, 10, 20]
      }
    ]
  }

  return <PageContainer title={school+"-"+subject + "-" + props.props.route.name}>
    {/*<Card title={"监测点"+content}>*/}
  {/*  <ReactECharts style={{width: 600, height: 400}} option={options} />*/}
  {/*</Card>*/}
    {props.children}
  </PageContainer>
}
